<%--
  Created by IntelliJ IDEA.
  User: a'su's
  Date: 2021/9/19
  Time: 18:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-1.11.1.js"></script>
    <script>
        $(function () {
            $("#btn").click(
                function () {
                    $.ajax({
                        type:"POST",
                        url:"/str3",
                        data:{username:"张三",password:"123"},
                        success:function (map) {
                            alert(map);
                            var str = "";
                            data.each(map,function (i,obj) {
                                str+="45";
                            });
                            $("#str").html(str);
                        }
                    });
                }
            );
        });
    </script>
</head>
<body>
    <form method="post">
        <button type="button" id="btn">提交ajax请求,返回map类型</button>
    </form>
<p id="res1"></p>
</body>
</html>
